Skip to content

Add instances for HashMap/HashSet #149

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

janherich
Copy link

Description of the change
This PR adds At/Index instances for HashSet/HashMap from unordered-collections package.


Checklist:

  • Added the change to the changelog's "Unreleased" section with a link to this PR and your username
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation in the README and/or documentation directory
  • Added a test for the contribution (if applicable)

@garyb
Copy link
Member

garyb commented Jun 21, 2025

I'm afraid this one is going to be declined, one of the rules for libraries in contrib is that they only depend on other libraries in contrib or on libraries in the core purescript organisation.

@janherich
Copy link
Author

janherich commented Jun 21, 2025

@garyb Got it, I'm very new to Purescript and that rule somehow evaded my attention.
Because orphaned typeclass instances are not allowed in Purescript, that severely limits usability of "generic" libraries (eq, generic datastructures, like purescript-unordered-collections) not in contrib packages.
I will try to discuss it on Discord, it seems like the correct way forward is to include purescript-unordered-collections in contrib, so I'm curious what are the blockers for that.

@garyb
Copy link
Member

garyb commented Jun 21, 2025

That's one option for sure, but ideally it would be nice to get the stuff sorted out so we have Hashable in the prelude too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants